import 'package:flutter_ncsjqz_getx/generated/json/base/json_convert_content.dart';
import 'package:flutter_ncsjqz_getx/model/account_record_entity.dart';

AccountRecordEntity $AccountRecordEntityFromJson(Map<String, dynamic> json) {
	final AccountRecordEntity accountRecordEntity = AccountRecordEntity();
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		accountRecordEntity.msg = msg;
	}
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		accountRecordEntity.code = code;
	}
	final AccountRecordData? data = jsonConvert.convert<AccountRecordData>(json['data']);
	if (data != null) {
		accountRecordEntity.data = data;
	}
	return accountRecordEntity;
}

Map<String, dynamic> $AccountRecordEntityToJson(AccountRecordEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['msg'] = entity.msg;
	data['code'] = entity.code;
	data['data'] = entity.data?.toJson();
	return data;
}

AccountRecordData $AccountRecordDataFromJson(Map<String, dynamic> json) {
	final AccountRecordData accountRecordData = AccountRecordData();
	final int? totalCount = jsonConvert.convert<int>(json['totalCount']);
	if (totalCount != null) {
		accountRecordData.totalCount = totalCount;
	}
	final int? pageSize = jsonConvert.convert<int>(json['pageSize']);
	if (pageSize != null) {
		accountRecordData.pageSize = pageSize;
	}
	final int? totalPage = jsonConvert.convert<int>(json['totalPage']);
	if (totalPage != null) {
		accountRecordData.totalPage = totalPage;
	}
	final int? currPage = jsonConvert.convert<int>(json['currPage']);
	if (currPage != null) {
		accountRecordData.currPage = currPage;
	}
	final List<AccountRecordDataList>? xList = jsonConvert.convertListNotNull<AccountRecordDataList>(json['list']);
	if (xList != null) {
		accountRecordData.xList = xList;
	}
	return accountRecordData;
}

Map<String, dynamic> $AccountRecordDataToJson(AccountRecordData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['totalCount'] = entity.totalCount;
	data['pageSize'] = entity.pageSize;
	data['totalPage'] = entity.totalPage;
	data['currPage'] = entity.currPage;
	data['list'] =  entity.xList?.map((v) => v.toJson()).toList();
	return data;
}

AccountRecordDataList $AccountRecordDataListFromJson(Map<String, dynamic> json) {
	final AccountRecordDataList accountRecordDataList = AccountRecordDataList();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		accountRecordDataList.id = id;
	}
	final dynamic? transactionNo = jsonConvert.convert<dynamic>(json['transactionNo']);
	if (transactionNo != null) {
		accountRecordDataList.transactionNo = transactionNo;
	}
	final int? userId = jsonConvert.convert<int>(json['userId']);
	if (userId != null) {
		accountRecordDataList.userId = userId;
	}
	final int? flag = jsonConvert.convert<int>(json['flag']);
	if (flag != null) {
		accountRecordDataList.flag = flag;
	}
	final int? type = jsonConvert.convert<int>(json['type']);
	if (type != null) {
		accountRecordDataList.type = type;
	}
	final String? typeName = jsonConvert.convert<String>(json['typeName']);
	if (typeName != null) {
		accountRecordDataList.typeName = typeName;
	}
	final int? amount = jsonConvert.convert<int>(json['amount']);
	if (amount != null) {
		accountRecordDataList.amount = amount;
	}
	final String? operationDate = jsonConvert.convert<String>(json['operationDate']);
	if (operationDate != null) {
		accountRecordDataList.operationDate = operationDate;
	}
	final String? remark = jsonConvert.convert<String>(json['remark']);
	if (remark != null) {
		accountRecordDataList.remark = remark;
	}
	return accountRecordDataList;
}

Map<String, dynamic> $AccountRecordDataListToJson(AccountRecordDataList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['transactionNo'] = entity.transactionNo;
	data['userId'] = entity.userId;
	data['flag'] = entity.flag;
	data['type'] = entity.type;
	data['typeName'] = entity.typeName;
	data['amount'] = entity.amount;
	data['operationDate'] = entity.operationDate;
	data['remark'] = entity.remark;
	return data;
}